Page({

    // 加载
    onLoad(e) {
        // 发送请求
        wx.request({
            url: 'https://cdn.liyanhui.com/data.json',
            data: {},
            header: {'content-type':'application/json'},
            method: 'GET',
            dataType: 'json',
            responseType: 'text',
            success: (result)=>{
                if (result.statusCode === 200) {
                    console.log(result.data)
                }
            },
            fail: ()=>{},
            complete: ()=>{}
        })
    }
})